from ImgUtils import ImgUtils
from paddleocr import PaddleOCR
import face_recognition
import cv2
import os
orc = PaddleOCR()

imgUtils = ImgUtils()
if __name__ == "__main__":
    # localPath = imgUtils.downImgae4url("https://img2020.cnblogs.com/blog/2181068/202011/2181068-20201110103125043-525249879.png")
    # if localPath != None:
    #     img = cv2.imread(localPath)
    #     print(orc.ocr(img))

    localFacePath = imgUtils.downImgae4url("https://china.cnr.cn/ygxw/201110/W020111018369689520074.jpg")
    if localFacePath != None:
        ifile = face_recognition.load_image_file(localFacePath)
        encode = face_recognition.face_encodings(ifile)
        print(encode)